package com.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dao.SysUserMapper;
import com.entity.SysUser;
import com.entity.SysUserExample;
import com.entity.SysUserExample.Criteria;
import com.service.SysUserService;

@Service
public class SysUserServiceImpl implements SysUserService {
    
	@Autowired
	private SysUserMapper sysUserMapper;
	
	
	
	@Override
	public int deleteByPrimaryKey(Long usrId) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insert(SysUser record) {
		// TODO Auto-generated method stub
		return sysUserMapper.insert(record);
	}
    
	//添加
	@Override
	public int insertSelective(SysUser record) {
		// TODO Auto-generated method stub
		
		return sysUserMapper.insertSelective(record);
	}
    
	
	//模糊查询
	@Override
	public List<SysUser> selectByExample() {
		// TODO Auto-generated method stub
		//Criteria criteria = sysUserExample.createCriteria();
		SysUserExample sysUserExample =new SysUserExample();
		//Criteria criteria = sysUserExample.createCriteria();
		//criteria.andSrRoleIdBetween((long)1, (long)5);
		//criteria.andUsrIdBetween((long)1, (long)5);
		return sysUserMapper.selectByExample(sysUserExample);
	}
    
	
	//查单条
	@Override
	public SysUser selectByPrimaryKey(Long usrId) {
		// TODO Auto-generated method stub
		return sysUserMapper.selectByPrimaryKey(usrId);
	}

	@Override
	public int updateByPrimaryKeySelective(SysUser record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(SysUser record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int getMax() {
		// TODO Auto-generated method stub
		return sysUserMapper.getMax();
	}

	

}
